사이트 내 전체검색
자바스크립트를 이용한 암호화
로빈아빠
https://cmd.kr/javascript/762 URL이 복사되었습니다.

본문

자바스크립트를 이용한 암호화

md4, md5, sha1, sha256, sha512 암호화 입니다.
출처는 http://pajhome.org.uk/crypt/md5 입니다.
첨부파일을 확인하세요.

<script src="md4.js" type="text/javascript"></script> 
<script src="md5.js" type="text/javascript"></script> 
<script src="sha1.js" type="text/javascript"></script> 
<script src="sha256.js" type="text/javascript"></script> 
<script src="sha512.js" type="text/javascript"></script> 
 
<form>
<table class="indented"> 
  <tr><th>Input</th><td><input type="text" name="input" size="40"></td></tr> 
  <tr><th>Calculate</th> 
  <td style="text-align:center">
  	<input type="button" style="width:100px;height:50px" onclick="hash.value = hex_md4(input.value)" value="MD4"> 
  	<input type="button" style="width:100px;height:50px" onclick="hash.value = hex_md5(input.value)" value="MD5"> 
  	<input type="button" style="width:100px;height:50px" onclick="hash.value = hex_sha1(input.value)" value="SHA-1">
  	<input type="button" style="width:100px;height:50px" onclick="hash.value = hex_sha256(input.value)" value="SHA-256">
  	<input type="button" style="width:100px;height:50px" onclick="hash.value = hex_sha512(input.value)" value="SHA-512">
  </td></tr> 
  <tr><th>Result</th><td><input type="text" name="hash" size="100"></td></tr> 
</table>
</form> 

<script language="JavaScript">
	var sign = hex_hmac_md5("bar", "foo");
	alert(sign);
</script>

댓글목록

등록된 댓글이 없습니다.

831 (4/17P)

Search

Copyright © Cmd 명령어 3.16.125.80